/**
 * 
 */
package org.mhz.sit.service;

import java.util.List;

import javafx.collections.ObservableList;

import org.mhz.sit.entity.BaseSpeaker;
import org.mhz.sit.entity.Speaker;
import org.mhz.sit.entity.SpeakerOffTopicOrder;
import org.mhz.sit.entity.SpeakerOrder;

/**
 * @author Mahan
 *
 * Speaker service
 */
public interface SpeakerService
{
    /**
     * @return The list of speakers
     */
    List<Speaker> getList();
    
    /**
     * @return The order of speakers
     */
    List<SpeakerOrder> getOrderOfSpeakers();
    
    /**
     * @return The order of speakers
     */
    List<SpeakerOffTopicOrder> getOffTopicOrder();
    
    /**
     * Add a speaker
     *
     * @param aSpeaker - The speaker to add
     * @param aObservableList - The list to add the speaker to
     */
    void addSpeaker(final Speaker aSpeaker, 
                    final ObservableList<Speaker> aObservableList);
     
    /**
     * Add to the speaker order
     *
     * @param aSpeaker - The speaker to add
     * @param aObservableList - The list to add the speaker to
     */
    void addToSpeakerOrder(final SpeakerOrder aSpeaker, 
                           final ObservableList<SpeakerOrder> aObservableList);
    
    /**
     * Update a speaker
     *
     * @param aSpeaker - The speaker to update
     */
    void updateSpeaker(final Speaker aSpeaker);  
    
    /**
     * Delete a speaker
     *
     * @param aSpeaker - The speaker to delete
     * @param aObservableList - The list to delete the speaker from
     */
    void deleteSpeaker(final Speaker aSpeaker, 
                       final ObservableList<Speaker> aObservableList);
    
    /**
     * Delete a speaker from the order
     *
     * @param aSpeaker - The speaker to delete
     * @param aObservableList - The list to delete the speaker from
     */
    void deleteSpeakerOrder(final SpeakerOrder aSpeaker, 
                            final ObservableList<SpeakerOrder> aObservableList);
    
    /**
     * Move the speaker to another list
     *
     * @param aSpeaker - The speaker to move
     * @param aObservableSpeakerOrderList - The order of speakers list
     * @param aObservableOffTopicOrderList - The off topic list
     */
    void moveSpeaker(final BaseSpeaker aSpeaker,
                     final ObservableList<SpeakerOrder> aObservableSpeakerOrderList,
                     final ObservableList<SpeakerOffTopicOrder> aObservableOffTopicOrderList);     
}
